<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>ECSHOP 管理中心 - <?php echo ($meta_title); ?> </title>
    <meta name="robots" content="noindex, nofollow">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="/Public/css/general.css" rel="stylesheet" type="text/css"/>
    <link href="/Public/css/main.css" rel="stylesheet" type="text/css"/>
    <script src="/Public/js/jquery-1.11.3.js"></script>

    
    <link rel="stylesheet" type="text/css" href="/Public/css/page.css" />
    <link rel="stylesheet" type="text/css" href="/Public/ext/treegrid/css/jquery.treegrid.css" />

    
    <script src="/Public/ext/treegrid/js/jquery.treegrid.js"></script>
    <script>
        $(function () {
            $('.tree').treegrid();
        });
    </script>

</head>
<body>

    <h1>
        <span class="action-span"><a href="<?php echo U('add');?>">权限添加</a></span>
        <span class="action-span1"><a href="<?php echo U();?>">权限管理</a></span>
        <span id="search_id" class="action-span1"> - <?php echo ($meta_title); ?> </span>
        <div style="clear:both"></div>
    </h1>
    <div class="form-div">
        <form action="<?php echo U('');?>" name="searchForm">
        </form>
    </div>
    <form method="post" action="" name="listForm">
        <div class="list-div" id="listDiv">
            <table cellpadding="3" cellspacing="1" class="tree">
                <tr>
                    <th>权限名</th>
                    <th>权限描述</th>
                    <th>排序</th>
                    <th>是否显示</th>
                    <th>操作</th>
                </tr>
                <?php if(is_array($rows)): foreach($rows as $key=>$row): ?><tr class="treegrid-<?php echo ($row["id"]); ?> <?php if(($row["level"]) != "1"): ?>treegrid-parent-<?php echo ($row["parent_id"]); endif; ?>">
                        <td class="first-cell"><?php echo ($row["name"]); ?></td>
                        <td class="center-cell"><?php echo ($row["intro"]); ?></td>
                        <td align="center"><?php echo ($row["sort"]); ?></td>
                        <td align="center"><img src="/Public/img/<?php echo ($row['status']); ?>.gif"></td>
                        <td>
                            <a href="<?php echo U('edit',array('id'=>$row['id']));?>"><img title="编辑" src="/Public/img/icon_edit.gif"
                                                                                width="16" height="16" border="0"/></a>
                            <a href="<?php echo U('del',array('id'=>$row['id']));?>"><img title="删除" src="/Public/img/icon_trash.gif"
                                                                               width="16" height="16" border="0"/></a>
                        </td>
                    </tr><?php endforeach; endif; ?>
                <tr>
                    <td align="right" nowrap="true" colspan="6">
                        <div class="page">
                            <?php echo ($page_html); ?>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </form>

<div id="footer">
    共执行 <?php echo N('db_query');?> 个查询，用时 <?php echo G('loadTime','initTime');?> 秒，Gzip 已禁用，内存占用 <?php echo number_format((memory_get_usage() - $GLOBALS['_startUseMems'])/1024);?> KB<br/>
    版权所有 &copy; 重庆京西商城，并保留所有权利。
</div>
</body>
</html>